using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Data;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Security.Permissions;
using System.Text;
using System.Xml;
using Oracle.ManagedDataAccess.Client;

namespace OracleInternal.Common
{
	internal class ConfigBaseClass
	{
		internal class StoredProcedureInfo
		{
			internal List<RefCursorInfo> m_refCursors = new List<RefCursorInfo>();

			internal List<RefCursorInfo> m_implicitlyRetRefCursors = new List<RefCursorInfo>();

			internal int m_numExplicitBoundRefCursors;

			internal RefCursorInfo GetRefCursorInfo(int currentResultIndex)
			{
				RefCursorInfo result = null;
				if (currentResultIndex < m_numExplicitBoundRefCursors && m_refCursors.Count > 0)
				{
					result = m_refCursors[currentResultIndex];
				}
				else
				{
					int num = currentResultIndex - m_numExplicitBoundRefCursors;
					if (num >= 0 && m_implicitlyRetRefCursors.Count > num)
					{
						result = m_implicitlyRetRefCursors[num];
					}
				}
				return result;
			}

			internal DataTable GetColumnInfo(int currentResultIndex)
			{
				DataTable result = null;
				RefCursorInfo refCursorInfo = GetRefCursorInfo(currentResultIndex);
				if (refCursorInfo != null && refCursorInfo.columnInfo.Rows.Count > 0)
				{
					result = refCursorInfo.columnInfo;
				}
				return result;
			}
		}

		internal const long m_DefaultTraceFileMaxSize = 100L;

		internal const int m_DefaultTraceOption = 0;

		internal const int m_DefaultTraceLevel = 0;

		[Configuration("CommandTimeout")]
		internal static int m_commandTimeout;

		[Configuration("CPVersion")]
		internal static string m_cpversion;

		internal static int m_cpMajorVersion;

		[Configuration("DbNotificationPort")]
		internal static int m_DBNotificationPort;

		[Configuration("DbNotificationAddress")]
		internal static string m_DBNotificationAddress;

		[Configuration("DemandOraclePermission")]
		internal static bool m_DemandOraclePermission;

		[Configuration("BindByName")]
		internal static bool m_BindByName;

		[Configuration("UseClientInitiatedCQN")]
		internal static bool m_bUseClientInitiatedCQN;

		internal const int DEFAULT_COMMAND_FETCHSIZE = 131072;

		[Configuration("FetchSize")]
		internal static int m_FetchSize;

		[Configuration("MaxStatementCacheSize")]
		internal static int m_MaxStatementCacheSize;

		[Configuration("MetaDataXml")]
		internal static string m_MetaDataXml;

		[Configuration("PROMOTABLE")]
		internal static PromotableTransaction m_PromotableTransaction;

		[Configuration("LegacyIsolationLevelBehavior")]
		internal static bool m_bLegacyIsolationLevelBehavior;

		[Configuration("SelfTuning")]
		internal static bool m_SelfTuning;

		internal const int DEFAULT_STMT_CACHE_SIZE = 0;

		[Configuration("StatementCacheSize")]
		internal static int m_StatementCacheSize;

		[Configuration("RevertBatchUpdateErrorHandling")]
		internal static bool m_RevertBUErrHandling;

		[Configuration("PerformanceCounters")]
		internal static long m_PerformanceCounters;

		[Configuration("InitialLOBFetchSize")]
		internal static int m_InitialLOBFetchSize;

		[Configuration("InitialLONGFetchSize")]
		internal static int m_InitialLONGFetchSize;

		[Configuration("TNS_ADMIN")]
		internal static string m_TnsAdminLocation;

		[Configuration("ORA_DEBUG_JDWP")]
		internal static string m_OraDebugJDWP;

		[Configuration("LDAP_ADMIN")]
		internal static string m_LdapAdminLocation;

		[Configuration("AttemptConnectDuringSvcRelocation")]
		internal static int m_attemptConnectDuringSvcReloc;

		[Configuration("ServiceRelocationConnectionTimeout")]
		internal static string m_serviceRelocationTimeout;

		[Configuration("ChunkMigrationConnectionTimeout")]
		internal static string m_chunkMigrationTimeout;

		[Configuration("XMLTypeClientSideDecoding")]
		internal static bool m_XMLTypeClientSideDecoding;

		[Configuration("TraceFileLocation")]
		internal static string m_traceFileLocation;

		[Configuration("TraceLevel")]
		internal static int m_TraceLevel;

		[Configuration("TraceOption")]
		internal static int m_TraceOption;

		[Configuration("LegacyEntireLOBFetch")]
		internal static bool m_bLegacyNegativeOneILFSBehavior;

		[Configuration("HAEvents")]
		internal static bool m_haEvents;

		internal static bool m_bHAEventsConfigured;

		[Configuration("LoadBalancing")]
		internal static bool m_loadBalancing;

		internal static bool m_bLoadBalancingConfigured;

		[Configuration("UseLegacyLocalParser")]
		internal static bool m_bUseLegacyLocalParser;

		[Configuration("ColumnCacheSize")]
		internal static int m_ColumnCacheSize;

		[Configuration("DRCPConnectionClass")]
		internal static string m_connectionClass;

		internal static object m_maxStatementCacheSizeLock;

		[Configuration("Edition")]
		internal static string m_appEdition;

		internal static Process CurrentProcess;

		internal const string CoreRunTimeName = "DOTNET";

		internal static string CoreRunTimeExt;

		internal static string ApplicationName;

		internal static Version m_assemblyVersion;

		internal static string m_sectionVersion;

		internal static string m_sqlnetOraLoc;

		internal static string m_TNSNamesoraloc;

		internal static ArrayList m_TNSConfigPath;

		internal static string m_OracleHome;

		internal static bool m_OracleHomeSet;

		[Configuration("TraceFileMaxSize")]
		internal static long m_TraceFileMaxSize;

		internal static char[] m_allowedCont;

		internal static char[] m_parens;

		internal static Hashtable m_configParameters;

		internal static Hashtable m_configParameters_nonsqlnet;

		internal static Hashtable m_configParametersClone;

		internal static Hashtable m_oracleConfigParameters;

		internal static Hashtable m_LDAPconfigParameters;

		internal static Hashtable m_configDataSourcesMap;

		internal static Hashtable m_connectionPoolNameMapping;

		internal static Hashtable m_udtMappings;

		internal static string m_singleTraceFileLocation;

		internal static char[] s_percentage;

		internal static char[] s_dollar;

		internal static char[] s_metachars;

		internal static char[] s_space_and_tab;

		internal static char[] s_dirSeparators;

		internal static string m_ONSWalletLocation;

		internal static string m_ONSProtocol;

		internal static string m_ONSConfigFile;

		internal static OnsConfigMode m_ONSMode;

		internal static Dictionary<string, Dictionary<string, string>> m_ONSMapping;

		internal static string m_nodeListFromConfFile;

		internal static ParseMode m_ParseMode;

		internal const ushort DTC_DEFAULT_RECO_PORT = 2030;

		internal const uint DTC_DEFAULT_TXNTIMETOLIVE = 120u;

		internal static string m_recoveryServiceHost;

		internal static ushort m_recoveryServicePort;

		internal static uint m_dtcTxnTimeout;

		internal static bool m_dtcUseDTCDLL;

		internal static bool m_dtcUseManagedDTC;

		internal static bool m_bIsManaged;

		internal static Hashtable m_configParamFrAppConfig;

		internal static Hashtable m_configParamFrSqlnetora;

		internal static Hashtable m_LDAPCfParamFrAppConfig;

		internal static ArrayList m_versionSpecificNodesList;

		private static ConfigBaseClass instance;

		internal StringBuilder mtsTrace = new StringBuilder();

		internal static Hashtable s_odtConfigNamesToRefCursorInfo;

		internal static NameValueCollection m_configSection;

		internal static Hashtable s_edmMapping;

		internal static string[] s_edmTypes;

		internal static int[] s_maxPrecision;

		internal static bool s_bEdmNumberMappingPresent;

		internal static bool s_bLegacyEdmMappingPresent;

		internal static bool s_bFromConfigSRCT;

		internal static int srctOffset;

		internal static bool s_bDrainTimeoutInSRCT;

		internal static bool s_bFromConfigCMCT;

		internal static int cmctOffset;

		internal static bool s_bTimeoutInCMCT;

		internal static Dictionary<string, DbType> s_EdmMappingToDbType;

		internal static DbType[] s_edmPrecisonMapping;

		internal string s_strReg = " (REGISTRY)";

		internal string s_strCfg = " (CONFIG)  ";

		internal string s_strOcfg = " (OCFG) ";

		internal string s_strVer = " (VERSION) ";

		internal string s_strEnv = " (ENVIRONMENT)";

		internal string s_strProdVer = " (PRODUCT VERSION) ";

		internal string s_strTrm = ")\n";

		internal Hashtable s_storedProcInformation = new Hashtable();

		internal static string s_appDir;

		internal virtual void ValidateEdmMapping()
		{
			int num = -1;
			for (int i = 0; i < s_edmTypes.Length; i++)
			{
				int num2 = GetMaxPrecision(s_edmTypes[i]);
				if (num2 < 0)
				{
					num2 = s_maxPrecision[i];
				}
				if (num2 > 0)
				{
					if (num > num2)
					{
						throw new ConfigurationErrorsException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.ODP_INVALID_VALUE, s_edmTypes[i]));
					}
					num = num2;
				}
			}
		}

		internal virtual void setudtmapping(out Hashtable s_mapUdtNameToMappingObj)
		{
			throw new NotImplementedException();
		}

		[SecurityPermission(SecurityAction.Assert, UnmanagedCode = true)]
		static ConfigBaseClass()
		{
			m_commandTimeout = 0;
			m_cpversion = "1.0";
			m_cpMajorVersion = 0;
			m_DBNotificationPort = -1;
			m_DBNotificationAddress = null;
			m_DemandOraclePermission = false;
			m_BindByName = false;
			m_bUseClientInitiatedCQN = false;
			m_FetchSize = 131072;
			m_MaxStatementCacheSize = -1;
			m_MetaDataXml = null;
			m_PromotableTransaction = PromotableTransaction.Promotable;
			m_bLegacyIsolationLevelBehavior = true;
			m_SelfTuning = true;
			m_StatementCacheSize = 0;
			m_RevertBUErrHandling = false;
			m_PerformanceCounters = 0L;
			m_InitialLOBFetchSize = -1;
			m_InitialLONGFetchSize = -1;
			m_TnsAdminLocation = null;
			m_OraDebugJDWP = null;
			m_LdapAdminLocation = null;
			m_attemptConnectDuringSvcReloc = 0;
			m_serviceRelocationTimeout = "90";
			m_chunkMigrationTimeout = "120";
			m_XMLTypeClientSideDecoding = false;
			m_traceFileLocation = null;
			m_TraceLevel = 0;
			m_TraceOption = 0;
			m_bLegacyNegativeOneILFSBehavior = false;
			m_haEvents = true;
			m_bHAEventsConfigured = false;
			m_loadBalancing = true;
			m_bLoadBalancingConfigured = false;
			m_bUseLegacyLocalParser = true;
			m_ColumnCacheSize = 100;
			m_connectionClass = null;
			m_maxStatementCacheSizeLock = new object();
			m_appEdition = "";
			CurrentProcess = null;
			CoreRunTimeExt = "dll";
			ApplicationName = string.Empty;
			m_assemblyVersion = null;
			m_sectionVersion = null;
			m_sqlnetOraLoc = null;
			m_TNSNamesoraloc = null;
			m_TNSConfigPath = new ArrayList();
			m_OracleHome = null;
			m_OracleHomeSet = false;
			m_TraceFileMaxSize = 100L;
			m_allowedCont = new char[7]
			{
				' ',
				'#',
				'\f',
				'\n',
				'\r',
				'\t',
				'\v'
			};
			m_parens = new char[2]
			{
				'(',
				')'
			};
			m_configParameters = new Hashtable(StringComparer.OrdinalIgnoreCase);
			m_configParameters_nonsqlnet = new Hashtable(StringComparer.OrdinalIgnoreCase);
			m_configParametersClone = new Hashtable(StringComparer.OrdinalIgnoreCase);
			m_oracleConfigParameters = new Hashtable(StringComparer.OrdinalIgnoreCase);
			m_LDAPconfigParameters = new Hashtable(StringComparer.OrdinalIgnoreCase);
			m_configDataSourcesMap = new Hashtable(StringComparer.OrdinalIgnoreCase);
			m_connectionPoolNameMapping = new Hashtable();
			m_udtMappings = new Hashtable();
			s_percentage = new char[1]
			{
				'%'
			};
			s_dollar = new char[1]
			{
				'$'
			};
			s_metachars = new char[2]
			{
				'%',
				'$'
			};
			s_space_and_tab = new char[2]
			{
				' ',
				'\t'
			};
			s_dirSeparators = new char[2]
			{
				Path.DirectorySeparatorChar,
				Path.AltDirectorySeparatorChar
			};
			m_ONSWalletLocation = null;
			m_ONSProtocol = null;
			m_ONSConfigFile = null;
			m_ONSMode = OnsConfigMode.Unspecified;
			m_ONSMapping = new Dictionary<string, Dictionary<string, string>>();
			m_nodeListFromConfFile = null;
			m_ParseMode = ParseMode.None;
			m_recoveryServiceHost = Environment.MachineName;
			m_recoveryServicePort = 2030;
			m_dtcTxnTimeout = 120u;
			m_dtcUseDTCDLL = false;
			m_dtcUseManagedDTC = false;
			m_bIsManaged = false;
			m_configParamFrAppConfig = new Hashtable(StringComparer.OrdinalIgnoreCase);
			m_configParamFrSqlnetora = new Hashtable(StringComparer.OrdinalIgnoreCase);
			m_LDAPCfParamFrAppConfig = new Hashtable(StringComparer.OrdinalIgnoreCase);
			m_versionSpecificNodesList = new ArrayList();
			s_odtConfigNamesToRefCursorInfo = new Hashtable();
			m_configSection = null;
			s_edmMapping = new Hashtable
			{
				{
					"BOOL",
					-2
				},
				{
					"BYTE",
					-1
				},
				{
					"INT16",
					5
				},
				{
					"INT32",
					10
				},
				{
					"INT64",
					19
				}
			};
			s_edmTypes = new string[5]
			{
				"BOOL",
				"BYTE",
				"INT16",
				"INT32",
				"INT64"
			};
			s_maxPrecision = new int[5]
			{
				-2,
				-1,
				5,
				10,
				19
			};
			s_bEdmNumberMappingPresent = false;
			s_bLegacyEdmMappingPresent = false;
			s_bFromConfigSRCT = false;
			srctOffset = 0;
			s_bDrainTimeoutInSRCT = false;
			s_bFromConfigCMCT = false;
			cmctOffset = 0;
			s_bTimeoutInCMCT = false;
			s_EdmMappingToDbType = new Dictionary<string, DbType>
			{
				{
					"BOOL",
					DbType.Boolean
				},
				{
					"BYTE",
					DbType.Byte
				},
				{
					"INT16",
					DbType.Int16
				},
				{
					"INT32",
					DbType.Int32
				},
				{
					"INT64",
					DbType.Int64
				},
				{
					"DECIMAL",
					DbType.Decimal
				}
			};
			s_edmPrecisonMapping = new DbType[39]
			{
				DbType.Decimal,
				DbType.Boolean,
				DbType.Byte,
				DbType.Byte,
				DbType.Int16,
				DbType.Int16,
				DbType.Int32,
				DbType.Int32,
				DbType.Int32,
				DbType.Int32,
				DbType.Int32,
				DbType.Int64,
				DbType.Int64,
				DbType.Int64,
				DbType.Int64,
				DbType.Int64,
				DbType.Int64,
				DbType.Int64,
				DbType.Int64,
				DbType.Int64,
				DbType.Decimal,
				DbType.Decimal,
				DbType.Decimal,
				DbType.Decimal,
				DbType.Decimal,
				DbType.Decimal,
				DbType.Decimal,
				DbType.Decimal,
				DbType.Decimal,
				DbType.Decimal,
				DbType.Decimal,
				DbType.Decimal,
				DbType.Decimal,
				DbType.Decimal,
				DbType.Decimal,
				DbType.Decimal,
				DbType.Decimal,
				DbType.Decimal,
				DbType.Decimal
			};
			try
			{
				bool flag = false;
				Assembly assembly = null;
				try
				{
					assembly = Assembly.GetEntryAssembly();
					if (assembly == null)
					{
						flag = true;
					}
				}
				catch
				{
				}
				if (flag)
				{
					try
					{
						s_appDir = Path.GetDirectoryName((string)Assembly.Load($"System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a").GetType("System.Web.HttpRuntime")!.GetProperty("AppDomainAppPath")!.GetValue(null, null));
					}
					catch
					{
						flag = false;
					}
				}
				if (flag)
				{
					return;
				}
				if (assembly != null)
				{
					try
					{
						s_appDir = Path.GetDirectoryName(assembly.Location);
					}
					catch
					{
					}
				}
				if (s_appDir == null)
				{
					try
					{
						s_appDir = Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName);
					}
					catch
					{
					}
				}
			}
			catch (Exception ex)
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.ConfigBaseClass, OracleTraceFuncName.cctor, "ConfigBaseClass() : " + ex);
				}
			}
			finally
			{
				if (s_appDir == null)
				{
					s_appDir = string.Empty;
				}
			}
		}

		internal ConfigBaseClass()
		{
		}

		private static bool IsDirExist(string str)
		{
			return Directory.Exists(str);
		}

		internal static string GetResolvedFileLocation(string path)
		{
			try
			{
				if (string.IsNullOrEmpty(path.Trim()))
				{
					return path;
				}
				string[] array = path.Trim().Split(s_dirSeparators);
				bool flag = path.IndexOfAny(s_metachars) != -1;
				bool bStartsWithSeparator = path.StartsWith(Path.DirectorySeparatorChar.ToString());
				bool bEndsWithSeparator = path.EndsWith(Path.DirectorySeparatorChar.ToString());
				bool bIsSharedLocation = path.StartsWith(Path.DirectorySeparatorChar.ToString() + Path.DirectorySeparatorChar);
				if (array.Length == 0)
				{
					return path;
				}
				string str = string.Empty;
				if (array[0] == "." || array[0] == "..")
				{
					str = s_appDir + Path.DirectorySeparatorChar;
				}
				else if (array[0].Trim() == "?")
				{
					string environmentVariable = Environment.GetEnvironmentVariable("ORACLE_HOME");
					if (environmentVariable == null)
					{
						return null;
					}
					array[0] = "";
					str = environmentVariable + Path.DirectorySeparatorChar;
				}
				if (flag)
				{
					string text = ResolveEnvVariables(array, bStartsWithSeparator, bEndsWithSeparator, bIsSharedLocation);
					if (text == null)
					{
						return null;
					}
					return str + text;
				}
				return str + path;
			}
			catch
			{
				return null;
			}
		}

		private static string ResolveEnvVariables(string[] folders, bool bStartsWithSeparator, bool bEndsWithSeparator, bool bIsSharedLocation)
		{
			try
			{
				int num = 0;
				int num2 = 0;
				StringBuilder stringBuilder = new StringBuilder(256);
				if (bIsSharedLocation)
				{
					stringBuilder.Append(Path.DirectorySeparatorChar);
					stringBuilder.Append(Path.DirectorySeparatorChar);
				}
				else if (bStartsWithSeparator)
				{
					stringBuilder.Append(Path.DirectorySeparatorChar);
				}
				for (int i = 0; i < folders.Length; i++)
				{
					string text = folders[i].Trim();
					int length = text.Length;
					char[] array = ((length > 2 && text[0] == '%' && text[length - 1] == '%') ? s_percentage : ((length > 1 && text[0] == '$') ? s_dollar : null));
					if (array != null)
					{
						for (int j = num2; j < num; j++)
						{
							if (!string.IsNullOrEmpty(folders[j]))
							{
								stringBuilder.Append(folders[j]);
								stringBuilder.Append(Path.DirectorySeparatorChar);
							}
						}
						num2 = num;
						if (!IsDirExist(stringBuilder.ToString() + folders[num]))
						{
							string text2 = text.Trim(array);
							string text3 = ((string.Equals(text2, "TNS_ADMIN", StringComparison.InvariantCultureIgnoreCase) && !string.IsNullOrEmpty(m_TnsAdminLocation)) ? m_TnsAdminLocation : Environment.GetEnvironmentVariable(text2));
							if (text3 != null)
							{
								text3 = text3.Trim();
							}
							if (string.IsNullOrEmpty(text3))
							{
								return null;
							}
							folders[num] = text3;
						}
					}
					num++;
				}
				StringBuilder stringBuilder2 = new StringBuilder(256);
				if (bIsSharedLocation)
				{
					stringBuilder2.Append(Path.DirectorySeparatorChar);
					stringBuilder2.Append(Path.DirectorySeparatorChar);
				}
				else if (bStartsWithSeparator)
				{
					stringBuilder2.Append(Path.DirectorySeparatorChar);
				}
				for (num = 0; num < folders.Length; num++)
				{
					if (!string.IsNullOrEmpty(folders[num].Trim()))
					{
						stringBuilder2.Append(folders[num]);
						if (num < folders.Length - 1)
						{
							stringBuilder2.Append(Path.DirectorySeparatorChar);
						}
					}
				}
				if (bEndsWithSeparator)
				{
					stringBuilder2.Append(Path.DirectorySeparatorChar);
				}
				return stringBuilder2.ToString();
			}
			catch
			{
				return null;
			}
		}

		internal static int GetMaxPrecision(string edmType, bool isEF6OrHigher = false)
		{
			bool flag = false;
			string text = edmType.Trim().ToUpperInvariant();
			if (isEF6OrHigher)
			{
				int result = -1;
				if (!flag)
				{
					PopulateMaxPrecisionArray();
					flag = true;
				}
				switch (text)
				{
				case "BOOL":
					result = s_maxPrecision[0];
					break;
				case "BYTE":
					result = s_maxPrecision[1];
					break;
				case "INT16":
					result = s_maxPrecision[2];
					break;
				case "INT32":
					result = s_maxPrecision[3];
					break;
				case "INT64":
					result = s_maxPrecision[4];
					break;
				}
				return result;
			}
			object obj = s_edmMapping[text];
			if (obj == null)
			{
				return -1;
			}
			return (int)obj;
		}

		internal static void PopulateMaxPrecisionArray()
		{
			int num = 0;
			for (int i = 0; i < s_edmTypes.Length; i++)
			{
				string key = s_edmTypes[i];
				if (!s_EdmMappingToDbType.ContainsKey(key))
				{
					continue;
				}
				s_EdmMappingToDbType.TryGetValue(key, out var value);
				for (int num2 = s_edmPrecisonMapping.Length - 1; num2 > 0; num2--)
				{
					if (s_edmPrecisonMapping[num2] == value)
					{
						num = num2;
						break;
					}
				}
				s_maxPrecision[i] = num;
				num = 0;
			}
		}

		public string RetrieveStringValue(string entryToBeSearched, object defaultValue, ref bool bFromConfigFile)
		{
			string text = null;
			if (this is CustomConfigFileReader)
			{
				try
				{
					if (m_configParameters.Count > 0 && m_configParameters[entryToBeSearched] != null)
					{
						text = (string)m_configParameters[entryToBeSearched];
						bFromConfigFile = true;
					}
				}
				catch
				{
				}
				if ((text == null || text == string.Empty) && defaultValue != null)
				{
					text = defaultValue.ToString();
					bFromConfigFile = false;
				}
				if (text != null && text != string.Empty)
				{
					if (string.Equals(text, "false", StringComparison.InvariantCultureIgnoreCase))
					{
						text = "0";
					}
					else if (string.Equals(text, "true", StringComparison.InvariantCultureIgnoreCase))
					{
						text = "1";
					}
				}
			}
			return text;
		}

		public int RetrieveIntValue(string entryToBeSearched, object defaultValue, bool bAcceptNegativeValues, ref bool bFromConfigFile)
		{
			int num = 0;
			try
			{
				num = int.Parse(RetrieveStringValue(entryToBeSearched, defaultValue, ref bFromConfigFile));
				if (!bAcceptNegativeValues)
				{
					if (num < 0)
					{
						return (int)defaultValue;
					}
					return num;
				}
				return num;
			}
			catch
			{
				return (int)defaultValue;
			}
		}

		internal StoredProcedureInfo GetStoredProcInfo(string commandText)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.ConfigBaseClass, OracleTraceFuncName.GetStoredProcInfo, "(REFCURSOR) GetRefCursorInfo(" + commandText + ")");
			}
			if (commandText == null || commandText.Length == 0)
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.ConfigBaseClass, OracleTraceFuncName.GetStoredProcInfo, "(REFCURSOR) GetRefCursorInfo(" + commandText + ") : no match");
				}
				return null;
			}
			commandText = commandText.Trim();
			StoredProcedureInfo storedProcedureInfo = null;
			string storedProcKey = null;
			if (s_storedProcInformation.Count > 0)
			{
				storedProcedureInfo = (StoredProcedureInfo)s_storedProcInformation[commandText];
				if (storedProcedureInfo == null)
				{
					storedProcKey = commandText;
					GetKeyInProperCase(ref storedProcKey);
					storedProcedureInfo = (StoredProcedureInfo)s_storedProcInformation[storedProcKey];
				}
			}
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				if (storedProcedureInfo == null)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.ConfigBaseClass, OracleTraceFuncName.GetStoredProcInfo, "(REFCURSOR) GetRefCursorInfo(" + commandText + ") : no match");
				}
				else if (storedProcKey == null)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.ConfigBaseClass, OracleTraceFuncName.GetStoredProcInfo, "(REFCURSOR) GetRefCursorInfo(" + commandText + ") : match found!");
				}
				else
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.ConfigBaseClass, OracleTraceFuncName.GetStoredProcInfo, "(REFCURSOR) GetRefCursorInfo(" + storedProcKey + ") : match found!");
				}
			}
			return storedProcedureInfo;
		}

		internal string GetAttrValueInProperCase(string attributeValue)
		{
			int length = attributeValue.Length;
			if (length > 0)
			{
				attributeValue = ((attributeValue[0] != '"' || attributeValue[length - 1] != '"') ? attributeValue.ToUpperInvariant() : attributeValue.Trim('"'));
			}
			return attributeValue;
		}

		internal void GetKeyInProperCase(ref string storedProcKey)
		{
			string[] array = storedProcKey.Split('.');
			StringBuilder stringBuilder = new StringBuilder();
			for (int i = 0; i < array.Length; i++)
			{
				if (i != 0)
				{
					stringBuilder.Append(".");
				}
				string attrValueInProperCase = GetAttrValueInProperCase(array[i].Trim());
				stringBuilder.Append(attrValueInProperCase);
			}
			storedProcKey = stringBuilder.ToString();
		}

		public static ConfigBaseClass GetInstance(bool bIsManaged = false)
		{
			if (instance == null)
			{
				instance = new CustomConfigFileReader(bIsManaged);
				instance.ParseConfigFile();
			}
			return instance;
		}

		internal virtual void ParseConfigFile()
		{
			throw new NotImplementedException();
		}

		internal static string CurOraFileLoc(OraFiles file)
		{
			if (file == OraFiles.TnsNames && string.IsNullOrEmpty(m_TNSNamesoraloc))
			{
				m_TNSNamesoraloc = ProviderConfig.NewOraFileLoc(OraFiles.TnsNames);
			}
			if (file != 0)
			{
				return m_sqlnetOraLoc;
			}
			return m_TNSNamesoraloc;
		}

		internal static Hashtable CurOraFileParams(OraFiles file)
		{
			if (file != 0)
			{
				return m_configParameters;
			}
			return m_configDataSourcesMap;
		}

		internal static ArrayList GetTnsNamesSearchPath(out bool isTnsnamesEnabled)
		{
			isTnsnamesEnabled = true;
			m_TNSNamesoraloc = ProviderConfig.NewOraFileLoc(OraFiles.TnsNames);
			return m_TNSConfigPath;
		}

		internal virtual void ParseClientXmlNode(XmlNode xmlElement, ref Hashtable hashtable, ref ArrayList arrayList, ArrayList filterNodes = null)
		{
			throw new NotImplementedException();
		}

		internal static string OraDebugJDWP()
		{
			if (string.IsNullOrEmpty(m_OraDebugJDWP))
			{
				return Environment.GetEnvironmentVariable("ORA_DEBUG_JDWP");
			}
			return m_OraDebugJDWP;
		}
	}
}
